

type envType = {
  admin: string
  user: string
}

type httpConfigType = {
  base: envType | string
  development: envType
  production: envType
  result_code: number
  error_code: number
  request_timeout: number
}

const httpConfig:httpConfigType = {
  // 开发环境接口前缀
  base: {
    admin: 'https://xxxx.cn',
    user: 'https://userxxxx.cn'
  },

  // 打包开发环境接口前缀
  development: {
    admin: 'https://testddxapi.dianmokeji.cn',
    user: 'https://userxxxx.cn'
  },

  // 打包生产环境接口前缀
  production: {
    admin: 'https://testzhuojieapi.dianmokeji.cn',
    user: 'https://userxxxx.cn'
  },

  /**
   * 接口成功返回状态码
   */
  result_code: 0,

  /**
   * 接口成功返回需重新登录状态码
   */
  error_code: 100,

  /**
   * 接口请求超时时间
   */
  request_timeout: 50000
}

export { httpConfig }
